@echo off
if not exist "..\ga\omp\Release\rastrigin_ga_omp.exe" (echo ERROR: ..\ga\omp\Release\rastrigin_ga_omp.exe not found
echo Please build project rastrigin_ga_omp
goto :eof
)

for %%R in (2222) do for %%G in (3) do (call :run %%R %%G griewangk_2_4000)
goto :eof

:run
echo randseed: %1, cpu: %2
if not exist "..\res\%3\%1" @mkdir "..\res\%3\%1"
if exist "..\res\%3\%1\%2.ga.omp.txt" del "..\res\%3\%1\%2.ga.omp.txt"
set OMP_NUM_THREADS=%2
"..\ga\omp\Release\rastrigin_ga_omp.exe" %1 ga_%3.xml > "..\res\%3\%1\%2.ga.omp.txt"